/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbravo.bean;

import cn.ekuma.data.dao.bean.I_AutoGeneratorStringKey;
import cn.ekuma.data.dao.bean.I_BaseBean;
import java.util.Date;

/**
 *
 * @author Administrator
 */
public class ProductPrefPrice implements I_BaseBean<String>,I_AutoGeneratorStringKey{
     /**
	 * 
	 */
	private static final long serialVersionUID = 2296198481599525001L;
	private String id;
     private String m_sId;//商品编号
     private String p_name;
     protected String attributesetid;//商品属性
     private boolean isCustomerPref;//是否只真对会员优惠

     private String prefType;//优惠类型
     public static String PREFTYPE_QuotaPref="Q";//限量
     public static String PREFTYPE_OverPref="O";//超量
     public static String PREFTYPE_TimePref="T";//限时
     public static String PREFTYPE_TimeAndQuotaPref="TQ";//限时限量
     public static String PREFTYPE_TimeAndOverPref="TO";//限时超量

     //限量特价
     private double storeNum;//库存量
     private double selledNum;//以销量

     //超量特价
     private double minNum;//最小量

     //限时特价
     private java.util.Date m_dStartDate;//启时
     private java.util.Date m_dStopDate;//止时


     private String prefModeType;//优惠方式
     public static String PREFMODETYPE_Rate="R";//打折
     public static String PREFMODETYPE_SellPrice="S";//特价
     public static String PREFMODETYPE_Largess="L";//连带赠送
     public static String PREFMODETYPE_ImmeLargess="I";//原商品直接赠送

     //价格打折
      private double prefRate;

      private double prefBuyPrice;
      //直售价
      private double prefPrice;

      //连带赠送
      private String m_sLargessId;//赠送商品编号
      protected String largessAttributesetid;//赠送商品属性
      private double LargessNum;//赠送量
      
      private Date curDate;//创建时间

    public ProductPrefPrice() {
    	this(null);
	}

	public ProductPrefPrice(String m_sId) {
        this.m_sId = m_sId;

        isCustomerPref=false;
        prefType=ProductPrefPrice.PREFTYPE_QuotaPref;
        storeNum=0;
        selledNum=0;
        minNum=0;
        m_dStartDate=new Date();
        m_dStopDate=m_dStartDate;
        prefModeType=ProductPrefPrice.PREFMODETYPE_SellPrice;
        prefRate=0;
        prefPrice=0;
        LargessNum=0;
        prefBuyPrice=0;
        curDate=new Date();
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public double getLargessNum() {
        return LargessNum;
    }

    public void setLargessNum(double LargessNum) {
        this.LargessNum = LargessNum;
    }

    public boolean isIsCustomerPref() {
        return isCustomerPref;
    }

    public void setIsCustomerPref(boolean isCustomerPref) {
        this.isCustomerPref = isCustomerPref;
    }

    public Date getM_dStartDate() {
        return m_dStartDate;
    }

    public void setM_dStartDate(Date m_dStartDate) {
        this.m_dStartDate = m_dStartDate;
    }

    public Date getM_dStopDate() {
        return m_dStopDate;
    }

    public void setM_dStopDate(Date m_dStopDate) {
        this.m_dStopDate = m_dStopDate;
    }

    public String getM_sId() {
        return m_sId;
    }

    public void setM_sId(String m_sId) {
        this.m_sId = m_sId;
    }

    public String getM_sLargessId() {
        return m_sLargessId;
    }

    public void setM_sLargessId(String m_sLargessId) {
        this.m_sLargessId = m_sLargessId;
    }

    public double getMinNum() {
        return minNum;
    }

    public void setMinNum(double minNum) {
        this.minNum = minNum;
    }

    public String getPrefModeType() {
        return prefModeType;
    }

    public void setPrefModeType(String prefModeType) {
        this.prefModeType = prefModeType;
    }

    public double getPrefRate() {
        return prefRate;
    }

    public void setPrefRate(double prefRate) {
        this.prefRate = prefRate;
    }

    public String getPrefType() {
        return prefType;
    }

    public void setPrefType(String prefType) {
        this.prefType = prefType;
    }


    public double getSellPrice() {
        return prefPrice;
    }

    public void setSellPrice(double sellPrice) {
        this.prefPrice = sellPrice;
    }

    public double getStoreNum() {
        return storeNum;
    }

    public void setStoreNum(double storeNum) {
        this.storeNum = storeNum;
    }

    public String getAttributesetid() {
        return attributesetid;
    }

    public void setAttributesetid(String attributesetid) {
        this.attributesetid = attributesetid;
    }

    public String getLargessAttributesetid() {
        return largessAttributesetid;
    }

    public void setLargessAttributesetid(String largessAttributesetid) {
        this.largessAttributesetid = largessAttributesetid;
    }

    public double getPrefPrice() {
        return prefPrice;
    }

    public void setPrefPrice(double prefPrice) {
        this.prefPrice = prefPrice;
    }

    public double getSelledNum() {
        return selledNum;
    }

    public void setSelledNum(double selledNum) {
        this.selledNum = selledNum;
    }

    public String getP_name() {
        return p_name;
    }

    public void setP_name(String p_name) {
        this.p_name = p_name;
    }

    @Override
    public String toString() {
        return p_name;
    }

    public String getKey() {
        return id;
    }

    public void setKey(String key) {
        id=key;
    }

	public boolean isCustomerPref() {
		return isCustomerPref;
	}

	public void setCustomerPref(boolean isCustomerPref) {
		this.isCustomerPref = isCustomerPref;
	}

	public double getPrefBuyPrice() {
		return prefBuyPrice;
	}

	public void setPrefBuyPrice(double prefBuyPrice) {
		this.prefBuyPrice = prefBuyPrice;
	}

	public Date getCurDate() {
		return curDate;
	}

	public void setCurDate(Date curDate) {
		this.curDate = curDate;
	}

	
	
}
